HBASE-30361 Align test tooling and documentation with JUnit 5 - #8625
liuxiaocs7 wants to merge 3 commits into
Conversation
liuxiaocs7
commented
Sep 7, 2026
- see: HBASE-30361
- Co-authored-by: OpenAI Codex (GPT-5.6)
Co-authored-by: OpenAI Codex <codex@openai.com>
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Aligns HBase’s test tooling and documentation with the JUnit 5 migration by removing JUnit 4-specific Surefire wiring and updating contributor docs/scripts to use JUnit 5 tags and extensions.
Changes:
- Remove legacy Surefire JUnit listener/provider configuration tied to JUnit 4.
- Update website docs to describe JUnit 5 (
@Tag, Jupiter extension auto-registration) and modern Mockito/JUnit usage. - Update test tooling script heuristics from JUnit 4
@Categoryto JUnit 5@Tag.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pom.xml | Drops JUnit 4-era Surefire listener property, relies on JUnit 5 extension auto-detection. |
| hbase-website/app/pages/_docs/docs/_mdx/(multi-page)/unit-testing.mdx | Updates examples/links to JUnit 5 + Mockito Jupiter, adds Surefire guidance. |
| hbase-website/app/pages/_docs/docs/_mdx/(multi-page)/building-and-developing/tests.mdx | Rewrites unit test guidelines around JUnit 5 tags and HBaseJupiterExtension. |
| hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterShutdown.java | Updates comment to reference HBaseJupiterExtension timeout behavior. |
| hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestsDriver.java | Updates Javadoc to reference JUnit 5 @Tag. |
| hbase-it/pom.xml | Removes the explicit surefire-junit4 provider dependency. |
| hbase-common/src/test/java/org/apache/hadoop/hbase/logging/TestLog4jUtils.java | Updates module-dependency rationale in comment. |
| hbase-common/src/test/java/org/apache/hadoop/hbase/logging/TestJul2Slf4j.java | Updates module-dependency rationale in comment. |
| hbase-annotations/src/test/java/org/apache/hadoop/hbase/testclassification/IntegrationTests.java | Updates Javadoc to reference JUnit 5 @Tag. |
| dev-support/hbasetests.sh | Switches categorization detection from @Category to @Tag(...TAG). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| import org.mockito.stubbing.Answer; | ||
|
|
||
| /** | ||
| * This should be in the hbase-logging module but the {@link HBaseClassTestRule} is in hbase-common |
There was a problem hiding this comment.
Since we have removed HBaseClassTestRule, is it possible to move this to hbase-logging?
There was a problem hiding this comment.
Hi, @Apache9, thanks for the comments. I had planned to address this in a follow-up issue, since retaining HBaseJupiterExtension would introduce a circular dependency: hbase-common already depends on hbase-logging. Would you prefer moving the tests here without the extension, or addressing this together in a follow-up?